<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title><?php echo($wait);?>提示</title>

    <link href="__UI__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__UI__/font-awesome/css/font-awesome.css" rel="stylesheet">

    <link href="__UI__/css/animate.css" rel="stylesheet">
    <link href="__UI__/css/style.css" rel="stylesheet">

</head>

<body class="gray-bg">
	
    <div class="middle-box text-center animated fadeInDown">
        <h1 id="code"><?php echo($wait);?></h1>
         <h2 class="font-bold" ><?php echo(strip_tags($msg));?></h2>
		 <?php
				if($url){
					echo '<p class="jump">';
					echo '页面自动 <a id="href" href="' . $url. '">跳转</a> 等待时间： <b id="wait">3</b></p>';
				}
		 ?>
    </div>
	
</body>
    <script type="text/javascript">
        (function(){
			var win = window.parent.length;
			var code = document.getElementById("code").innerText;
            var wait = 3,href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait;console.log(time);
				document.getElementById('wait').innerHTML = time;
                if(time <= 0) {
					clearInterval(interval);
						if(code == '029'){ console.log('029');
							if(win > 0 ){
								parent.location.reload()
							}else{
								window.location.reload();
							}
						}
               };
            }, 1000);
        })();
    </script>
</html>
